package com.akkainaction.mailbox.config;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.mailbox.config.actor.UnboundPriorityMailboxActor;
import com.typesafe.config.ConfigFactory;

import java.util.Arrays;
import java.util.List;

public class TestConfigUnboundPriorityMailboxActor {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys", ConfigFactory.load("config-actor-mailbox.conf"));
        ActorRef priorityActor = system.actorOf(Props.create(UnboundPriorityMailboxActor.class), "priorityActor");
        List<String> messageList = Arrays.asList("赵六", "张三", "李四");
        for (String message : messageList) {
            priorityActor.tell(message, ActorRef.noSender());
        }
    }
}
